﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Coldairarrow.Entity.Interface
{
    /// <summary>
    /// 众包库存信息
    /// </summary>
    /// 
    public class ZB_Inventory
    {

        /// <summary>
        /// 
        /// </summary>
        public string ID { get; set; }
        public string RowId { get; set; }
        /// <summary>
        /// 在途数量
        /// </summary>
        public int onWayQty { get; set; }
        /// <summary>
        /// 可售数量
        /// </summary>
        public int saleQty { get; set; }
        /// <summary>
        /// 锁定数量
        /// </summary>
        public int lockQty { get; set; }
        /// <summary>
        /// 次品(不良品)数量
        /// </summary>
        public int badQty { get; set; }
        /// <summary>
        /// 库存总数量
        /// </summary>

        public int totalQty { get; set; }
        /// <summary>
        /// 入库数量
        /// </summary>
        public int asnQty { get; set; }
        /// <summary>
        /// 出库数量
        /// </summary>
        public int outQty { get; set; }
        /// <summary>
        /// 退货数量
        /// </summary>
        public int returnQty { get; set; }
        /// <summary>
        /// 良品退货数量
        /// </summary>
        public int goodReturnQty { get; set; }
        /// <summary>
        /// 次品(不良品)退货数量
        /// </summary>
        public int badReturnQty { get; set; }
        /// <summary>
        /// 销毁数量
        /// </summary>
        public int destroyQty { get; set; }
        /// <summary>
        /// 转移数量
        /// </summary>
        public int transferQty { get; set; }
        /// <summary>
        /// 货值(USD)
        /// </summary>
        public decimal totalPrice { get; set; }
        /// <summary>
        /// 库存状态:1=>未出库,2=>部分出库,3=>全部出库
        /// </summary>
        private string status_;
        public string status
        {

            get
            {
                return status_;
            }


            set
            {
                if (value == "1") status_ = "未出库";
                else if (value == "2") status_ = "部分出库";
                else if (value == "3") status_ = "全部出库";
                else status_ = value;
            }

        }
        /// <summary>
        /// 仓库代码
        /// </summary>
        public string openWarehouse_warehouseCode { get; set; }
        /// <summary>
        /// 仓库信息
        /// </summary>
        public OpenWarehouse openWarehouse { get; set; }


        public class OpenWarehouse
        {
            public string warehouseCode { get; set; }
        }

        /// <summary>
        /// 产品代码
        /// </summary>
        public string openProduct_productSku { get; set; }
        /// <summary>
        /// 产品名称
        /// </summary>
        public string openProduct_name { get; set; }

        /// <summary>
        /// 产品信息
        /// </summary>
        public OpenProduct openProduct { get; set; }


        public class OpenProduct
        {
            public string productSku { get; set; }
            public string name { get; set; }
            public string nameEn { get; set; }
        }
    }

}
